package com.astar.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by liuruiyan on 2019/3/27.
 */
public class CustomDateUtil {

    /**
     * 获取当前日期字符串  YYYYMMDD
     * @param date
     * @return
     */
    public static String getCurrentDate(Date date){
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYYMMdd");
        return simpleDateFormat.format(new Date());
    }


    public static void main(String[] args) {
        System.out.println(getCurrentDate(new Date()));
    }
}
